﻿<UserControl x:Class="Projecturo.ProjecturoClient.View.UserProfilView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ext="clr-namespace:Projecturo.ProjecturoClient.Extension"
    Height="Auto" Width="Auto">
    <DockPanel LastChildFill="True">
        <GroupBox Header="Change Password" DockPanel.Dock="Top">
            <StackPanel>
                <TextBlock Text="Old Password"/>
                <PasswordBox ext:PasswordBoxBinding.BindPassword="true" ext:PasswordBoxBinding.BoundPassword="{Binding Path=OldPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <TextBlock Text="New Password"/>
                <PasswordBox ext:PasswordBoxBinding.BindPassword="true" ext:PasswordBoxBinding.BoundPassword="{Binding Path=NewPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <TextBlock Text="Confirm New Password"/>
                <PasswordBox ext:PasswordBoxBinding.BindPassword="true" ext:PasswordBoxBinding.BoundPassword="{Binding Path=NewPasswordConfirmed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                <Button Content="Change Password" Command="{Binding ChangePasswordCommand}"/>
            </StackPanel>
        </GroupBox>
        <GroupBox Header="Change Userdata">
            <StackPanel>
                <TextBlock Text="Username"/>
                <TextBlock Text="{Binding User.Username}"/>
                <TextBlock Text="First Name"/>
                <TextBox Text="{Binding User.FirstName}"/>
                <TextBlock Text="Last Name"/>
                <TextBox Text="{Binding User.LastName}"/>
                <TextBlock Text="Short Name"/>
                <TextBox Text="{Binding User.ShortName}"/>
                <Button Content="Save Userdata" Command="{Binding SaveUserCommand}"/>
            </StackPanel>
        </GroupBox>
        
    </DockPanel>
</UserControl>
